# coding=utf-8
from framework.base_page import BasePage
#订单详情页面一些操作
class EportsQuotationDeailPage(BasePage):
    btn_quotation = "xpath=>//*[@id='root']/div/div/div/div[2]/div/div/div/div[2]/div/div/div[3]/div[1]/div/div/div/div/div[1]/div[2]"
    input_agencyfee = "xpath=>//*[@id='templateItems[0].templateItemCosts[0].amountAll']/label[2]/span[2]/div/div[2]/input"
    input_fee1 = "xpath=>//*[@id='templateItems[1].templateItemCosts[0].amountAll']/label[2]/span[2]/div/div[2]/input"
    btn_agencyfeeSave = "xpath=>//*[@id='root']/div/div/div/div[2]/div/div/div/div[2]/div/div/div[3]/div[3]/div[2]/div[3]/div[1]/div/div/div/div/div/table/tbody/tr[2]/td/div/div[1]/div/div/div/div/div/table/tbody/tr/td[3]/div/a[1]"
    btn_portcaptainSave = "xpath=>//*[@id='root']/div/div/div/div[2]/div/div/div/div[2]/div/div/div[3]/div[3]/div[2]/div[3]/div[1]/div/div/div/div/div/table/tbody/tr[4]/td/div/div[1]/div/div/div/div/div/table/tbody/tr/td[3]/div/a[1]"
    btn_quotenow = "xpath=>//*[@id='root']/div/div/div/div[2]/div/div/div/div[2]/div/div/div[3]/div[3]/div[2]/div[4]/button[2]"
    btn_continue = "xpath=>/html/body/div[3]/div/div[2]/div/div[2]/div/div/div[2]/button[2]"
    btn_OK = "xpath=>/html/body/div[3]/div/div[2]/div/div[2]/div/div/div[2]/button"

    def click_quotation(self):
        self.click(self.btn_quotation)
        self.sleep(2)

    def type_agencyfee(self,text):
        self.type(self.input_agencyfee,text)
        self.sleep(2)

    def type_fee1(self,text):
        self.type(self.input_fee1,text)
        self.sleep(2)

    def click_agencyfee(self):
        self.click(self.btn_agencyfeeSave)
        self.sleep(2)

    def click_portcaptain(self):
        self.click(self.btn_portcaptainSave)
        self.sleep(2)

    def click_quotenow(self):
        self.click(self.btn_quotenow)
        self.sleep(2)

    def click_continue(self):
        self.click(self.btn_continue)
        self.sleep(2)

    def click_OK(self):
        self.click(self.btn_OK)
        self.sleep(3)
